<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div id="box"></div>
  <script>

    //定义列表数据
    var foods = ['烧烤','火锅','串串','烤冷面','炸酱面',];
    //选择元素
    var box = document.getElementById("box");
    var ul = document.createElement("ul");
    box.appendChild(ul);
    // 循环数组
    for(var i = 0; i < foods.length; i++){
      var li = document.createElement('li');
      ul.appendChild(li);
      li.innerText = foods[i];
    }

  </script>
</body>
</html>